import Hips from '@hips/vue-core';
import Dsx from '@hips/plugin-dataset-vuex';

import FastClick from 'fastclick';

import App from './App.vue';

import 'x-photoswipe/dist/photoswipe.css';
import 'x-photoswipe/dist/default-skin/default-skin.css';
import './style/reset.css';
import './style/normalize.css';

import {
  Toast,
  Indicator,
  Dialog,
  NumberKeyboard,
  Actionsheet,
  Notify,
  ImagePreview,
  Previewer,
  Validate,
} from '@hips/vue-ui';

// if (process.env.VUE_APP_ENV !== 'production') {
//   const VConsole = require('vconsole');
//   new VConsole(); // eslint-disable-line
// }

const plugins = [
  Dsx,
  Toast,
  Indicator,
  Dialog,
  NumberKeyboard,
  Actionsheet,
  Notify,
  ImagePreview,
  Previewer,
  Validate,

];

const { Router } = Dsx;

const hips = new Hips({
  el: '#app',
  root: App,
});

hips.inject(plugins);

const { router } = new Router();

hips.start({ router });

FastClick.attach(document.body);
